<?php

ini_set('display_errors', 'on');
ini_set('magic_quotes_runtime', 0); 

define('DB_HOST', '127.0.0.1');
define('DB_NAME', 'polytechColoc');
define('DB_USER', 'root');
define('DB_PASSWORD', '');

//Autoload classes when necessary
function __autoload($className)
{
	if (!class_exists($className, false)){
		if (file_exists(dirname(__FILE__) . '/../classes/domain/'.$className.'.php'))
			require(dirname(__FILE__) . '/../classes/domain/'.$className.'.php');
		elseif (file_exists(dirname(__FILE__) . '/../classes/db/'.$className.'.php'))
			require(dirname(__FILE__) . '/../classes/db/'.$className.'.php');
		else
			echo 'Erreur fatale';
	}
}

session_start();

?>